package com.mzj.saas.mservice.roles.mapper;

import com.mzj.saas.mservice.roles.vo.RoleVO;
import org.springframework.jdbc.core.RowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;

public class RoleRowMapper  implements RowMapper<RoleVO> {
    @Override
    public RoleVO mapRow(ResultSet rs, int rowNum) throws SQLException {
        RoleVO vo = new RoleVO();
        vo.setId(rs.getLong("id"));
        vo.setOrgId(rs.getLong("org_id"));
        vo.setParentId(rs.getLong("parent_id"));
        vo.setName(rs.getString("name"));
        vo.setCode(rs.getString("code"));
        vo.setProperty(rs.getInt("property"));
        vo.setType(rs.getInt("type"));
        vo.setPropertyType(rs.getInt("property_type"));
        vo.setDescription(rs.getString("description"));
        return vo;
    }
}
